<template>
	<view>
		<home ref="mescrollItem0" :i="0" :index="tabIndex" :scrollTop="scrollTop" @tabChange="tabChange"></home>
		<orderlist ref="mescrollItem2" :i="2" :index="tabIndex"></orderlist>
		<ztabbar :tabIndex="tabIndex" @tabChange="tabChange"></ztabbar>
	</view>
</template>

<script>
import { mapState, mapMutations, mapActions } from 'vuex';
import home from './home.vue';
import orderlist from './orderlist';
import ztabbar from '@/components/ztabbar.vue';
import MescrollMoreMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mixins/mescroll-more.js';
export default {
	components: { home, ztabbar, orderlist },
	mixins: [MescrollMoreMixin],
	data() {
		return {
			tabIndex: 0,
			scrollTop: 0
		};
	},
	created() {},

	mounted() {},
	methods: {
		changeOrder(type) {
			if (this.$refs.mescrollItem2) {
				this.$refs.mescrollItem2.tabIndex = type;
				if (this.$refs.mescrollItem2.isInit) {
					this.$refs.mescrollItem2.tabChange();
					// this.$refs.mescrollItem2.uploadlist();
				}
				this.tabChange(2);
			}
		}
	}
};
</script>
